import Vue from 'vue'
import VueRouter from 'vue-router'
import Splash from '../views/splash/index';
import Visualization from '../views/visualization/index';
import Page1 from '../views/page1/index';
import Page2 from '../views/page2/index';
import Page3 from '../views/page3/index';
import Page4 from '../views/page4/index';
import Page5 from '../views/page5/index';
import Page6 from '../views/page6/index';
import Page7 from '../views/page7/index';

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    redirect: '/splash'
  },
  {
    path: '/splash',
    name: 'splash',
    component: Splash,
  },
  {
    path: '/visualization',
    name: 'visualization',
    component: Visualization,
    redirect: '/page1',
    children: [
      {
        path: '/page1',
        name: 'page1',
        component: Page1,
      },
      {
        path: '/page2',
        name: 'page2',
        component: Page2,
      },
      {
        path: '/page3',
        name: 'page3',
        component: Page3,
      },
      {
        path: '/page4',
        name: 'page4',
        component: Page4,
      },
      {
        path: '/page5',
        name: 'page5',
        component: Page5,
      },
      {
        path: '/page6',
        name: 'page6',
        component: Page6,
      },
      {
        path: '/page7',
        name: 'page7',
        component: Page7,
      }
    ],
  },
]

const router = new VueRouter({
  // mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
